package day0717;

import java.util.Scanner;

public class Test14 {
    public static void main(String[] args) {
        //输入三个数
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入一个数百位，十位，个数：");
        int b=sc.nextInt();
        int s=sc.nextInt();
        int g=sc.nextInt();
        while(b*b*b + s*s*s + g*g*g  !=   b*100+s*10+g  ){
            System.out.println("该数字不是水仙花数，请继续输入");
            b=sc.nextInt();
            s=sc.nextInt();
            g=sc.nextInt();
        }
        System.out.println(b*100+s*10+g +"是水仙花数");
    }
}
